<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 可达性
        var user = {
            name: 'john'
        }
        // user = null;
        // 约翰这个对象不可达,会被回收


        var admin = user;
        user = null;
        // admin 保留着 对象的引用,所以不会被回收
    </script>
</body>

</html>